FROM python:3.9.7-slim-buster

WORKDIR /dynamics_proxy_server
RUN sed -i s/deb.debian.org/mirrors.ustc.edu.cn/g /etc/apt/sources.list
RUN apt-get update
RUN apt-get install vim git -y
RUN rm -f /etc/localtime
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo "Asia/Shanghai" > /etc/timezone
COPY . .
RUN python -m pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple
RUN pip install -r requirement.txt -i https://mirrors.aliyun.com/pypi/simple
# docker build -t dynamics_proxy_server .
# docker run --name proxy_server_dly --restart=always -p 18002:18001 -itd dynamics_proxy_server python main.py
